<?php
/**
 *
 *
 *
 */
namespace Yz\modules\Modules;

class Action_SelectList
    extends \Yz\modules\Generic\Action_SelectList
{

    const FILTER_WEB_MODULES = 't0.isWebModule=1';

    /** The filter
     *  @var string
     */
    protected $filter;

    /**
     *
     */
    public function filterWebModules()
    {
        $this->filter = self::FILTER_WEB_MODULES;
        return $this;
    }


    /**
     *  Modified SELECT statement creator
     *
     */
    protected function buildSelect()
    {
        debug();
        $sql = parent::buildSelect();
        if ($this->filter) {
            $sql
                ->where($this->filter);
        }
        return $sql;
    }

}
